Listing 7. Modified DataSet tagThe only change needed is to add roles to the fields retrieved by the SELECT statement, where roles, a varchar in the members table, holds the user's role(s) in a comma-separated string.
<MM:DataSet id="DS_uidAndPwd" runat="Server" IsStoredProcedure="false" ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_security"] %>' DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_security"] %>' CommandText='<%# "SELECT emailaddr, password, roles FROM dbo.members WHERE emailaddr=@emailaddr AND password=@password" %>' Debug="true" > <Parameters> <Parameter Name="@emailaddr" Value='<%# ((Request.Form["emailaddr"] != null) && (Request.Form["emailaddr"].Length > 0)) ? Request.Form["emailaddr"] : "" %>' Type="VarChar" /> <Parameter Name="@password" Value='<%# ((Request.Form["password"] != null) && (Request.Form["password"].Length > 0)) ? Request.Form["password"] : "" %>' Type="VarChar" /> </Parameters> </MM:DataSet>